MyUserPaneDrawProc
NEW WITH THE APPEARANCE MANAGER
Draws the content of your user pane control in the rectangle of user pane control.The Control Manager declares the type for an application-defined user pane draw function as follows:
typedef pascal void (*ControlUserPaneDrawProc)( ControlHandle control, SInt16 part);The Control Manager defines the data typeControlUserPaneDrawUPP
to identify the universal procedure pointer for this application-defined function:
typedef UniversalProcPtr ControlUserPaneDrawUPP;You typically use theNewControlUserPaneDrawProc
macro like this:
ControlUserPaneDrawUPP
myControlUserPaneDraw
UPP;
myControlUserPaneDraw
UPP =NewControlUserPaneDrawProc
(MyUserPaneDraw);You typically use the
CallControlUserPaneDrawProc
macro like this:
CallControlUserPaneDrawProc
(myControlUserPaneDraw
UPP, control, part);Here's how to declare the function
MyUserPaneDrawProc:
pascal void MyUserPaneDrawProc ( ControlHandle control, SInt16 part);
control
- A handle to the user pane control in which you wish drawing to occur.
part
- The part code of the control you should draw. If 0, draw the entire control.
DISCUSSION
Once you have created the functionMyUserPaneDrawProc
, passkControlUserPaneDrawProcTag
in thetagName
parameter ofSetControlData
.The Control Manager will draw the user pane control with a universal procedure pointer toMyUserPaneDrawProc
.